import 'package:jet_rails/jr_app/jr_models/jr_user_model.dart';
import 'package:json_annotation/json_annotation.dart';

part 'jr_media_model.g.dart';

@JsonSerializable()
class JrMediaModel {
  String? mediaId;
  String? mediaPath;
  String? mediaType;
  String? mediaUrl;
  String? middleThumbUrl;
  String? sort;
  String? thumbUrl;
  String? userId;
  JrUserModel? author;

  JrMediaModel({
    this.mediaId,
    this.mediaPath,
    this.mediaType,
    this.mediaUrl,
    this.middleThumbUrl,
    this.sort,
    this.thumbUrl,
    this.userId,
    this.author
  });

  factory JrMediaModel.fromJson(Map<String, dynamic> json) => _$JrMediaModelFromJson(json);

  Map<String, dynamic> toJson() => _$JrMediaModelToJson(this);
}